package com.project.mapper;

import com.project.bean.DiscussBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface IDiscussMapper {
    public List<DiscussBean> findByTopic(int id);

    @Insert("insert into t_discuss(fk_userId,fk_topicId,d_date,d_title,d_contents)" +
            "values(#{userBean.id},#{topicBean.id},#{date},#{title},#{contents})")
    public void add(DiscussBean discussBean);

}
